package com.yyfax.pay.common.model.vo;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 跳转实体对象
 * 
 * @author buyi
 * @date 2017-09-01 10:36:57
 * @since v2.0.0
 */
public class RedirectFormVO<T> {

	private String url;

	private T params;

	/**
	 * 实例化
	 * 
	 * @author buyi
	 * @date 2017-09-28 10:24:13
	 * @since v2.0.0
	 * @param url
	 * @param params
	 * @return
	 */
	public static <T> RedirectFormVO<T> newInstance(String url, T params) {
		return new RedirectFormVO<T>(url, params);
	}

	private RedirectFormVO() {
		super();
	}

	private RedirectFormVO(String url, T params) {
		super();
		this.url = url;
		this.params = params;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public T getParams() {
		return params;
	}

	public void setParams(T params) {
		this.params = params;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}
}
